From: kaf24@firebug.cl.cam.ac.uk Date: Fri, 19 May 2006 15:07:36 +0000 (+0100) Subject: [XEND] separate concept of initial memory size and overhead memory size. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~16047^2~23^2~2 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=0a44ca5991690acb6c6d88f08dfbe2fa8144ac14;p=xen.git [XEND] separate concept of initial memory size and overhead memory size. When a domain (whether para- or fully-virtualized) reports how much overhead memory it requires (via getDomainMemory in image.py), all such memory was immediately allocated to the domain itself. This is certainly incorrect for HVM domains, since additional increase_reservation calls are made later in qemu. Since all ballooned memory is already taken, qemu will fail. The fix is to treat the requested memory size and the overhead size as separate values. The requested memory size is immediately allocated to the new domain; the overhead is left unallocated for whatever else might need it later. Signed-off-by: Charles Coffing --- diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index f6961b71c9..029c0c969c 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -1264,7 +1264,7 @@ class XendDomainInfo: m = self.image.getDomainMemory(self.info['memory'] * 1024) balloon.free(m) xc.domain_setmaxmem(self.domid, m) - xc.domain_memory_increase_reservation(self.domid, m, 0, 0) + xc.domain_memory_increase_reservation(self.domid, self.info['memory'] * 1024, 0, 0) self.createChannels()